<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="x-ua-compatible" content="ie=edge">

    <title>{$title|default=''} | 后台管理 —— ThinkPHP5.0开发示例</title>

    <!-- Font Awesome Icons -->
    <link rel="stylesheet" href="__STATIC__/adminlte/plugins/fontawesome-free/css/all.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="__STATIC__/adminlte/dist/css/adminlte.min.css">
    <!-- Google Font: Source Sans Pro -->
    <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
</head>
<body class="hold-transition {$Think.Cookie.sidebar}">
<div class="wrapper">

    <!-- Navbar -->
    <nav class="main-header navbar navbar-expand navbar-white navbar-light">
        <!-- Left navbar links -->
        <ul class="navbar-nav">
            <li class="nav-item">
                <a id="fa-bars" class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
            </li>
            <li class="nav-item d-none d-sm-inline-block">
                <a href="{:url('/')}" class="nav-link">主站</a>
            </li>
            <li class="nav-item d-none d-sm-inline-block">
                <a href="{:url('index/index/course')}" class="nav-link">课程表</a>
            </li>
        </ul>

        <!-- SEARCH FORM -->
        <form class="form-inline ml-3" action="{:url('index/index/like')}">
            <div class="input-group input-group-sm">
                <input name="search" class="form-control form-control-navbar" type="search" placeholder="Search"
                       aria-label="Search">
                <div class="input-group-append">
                    <button class="btn btn-navbar" type="submit">
                        <i class="fas fa-search"></i>
                    </button>
                </div>
            </div>
        </form>

        <!-- Right navbar links -->
        <ul class="navbar-nav ml-auto">
            <!-- Messages Dropdown Menu -->
            {if condition="!$Think.cookie.admin_id"}


            <li class="nav-item dropdown">
                <a class="nav-link" href="__ROOT__/index/index/login">登录</a>

            </li>
            <li class="nav-item dropdown">
                <a class="nav-link" href="{:url('index/index/register')}"
                   target="_blank">注册</a>
            </li>
            <li class="nav-item dropdown">
                <a class="nav-link"
                   href="https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=100556678&redirect_uri=http://open.gaoxueya.com/index/api/qq&scope=get_user_info"
                   target="_black"> <img class="img-circle img " src="__STATIC__/images/ico_login_qq.png"/></a>


            </li>
            {/if}

            {if condition="$Think.cookie.admin_id"}

            {if condition="!$visitCount"}
            <li class="nav-item dropdown">
                <a class="nav-link" href="{:url('index/msg/visit')}">
                    <i class="far fa-comments"></i>
                </a>
            </li>
            {/if}

            {if condition="$visitCount"}
            <li class="nav-item dropdown">
                <a class="nav-link" data-toggle="dropdown" href="#">
                    <i class="far fa-comments"></i>
                    <span class="badge badge-danger navbar-badge">{$visitCount}</span>
                </a>
                <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">

                    {volist name="visit" id="vo"}


                    <a href="{:url('index/msg/visit')}" class="dropdown-item">
                        <!-- Message Start -->
                        <div class="media">
                            <img src=" {$vo.user.photo?:'__STATIC__/images/logo.jpg'}"
                                 alt="User Avatar" class="img-size-50 img-circle mr-3">
                            <div class="media-body">
                                <h3 class="dropdown-item-title">
                                    {$vo.user.nickname?:$vo.user.admin_id}
                                    <span class="float-right text-sm text-warning"><i class="fas fa-star"></i></span>
                                </h3>
                                <p class="text-sm">访问了你的主页</p>
                                <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> {$vo.create_time}</p>
                            </div>
                        </div>
                        <!-- Message End -->
                    </a>
                    <div class="dropdown-divider"></div>
                    {/volist}

                    <a href="{:url('index/msg/visit')}" class="dropdown-item dropdown-footer">See All Messages</a>
                </div>
            </li>
            {/if}


            <!-- Notifications Dropdown Menu -->
            <li class="nav-item dropdown">
                <a class="nav-link" data-toggle="dropdown" href="#">
                    <i class="far fa-bell"></i>
                    <span class="badge badge-warning navbar-badge">15</span>
                </a>
                <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
                    <span class="dropdown-header">15 Notifications</span>
                    <div class="dropdown-divider"></div>
                    <a href="#" class="dropdown-item">
                        <i class="fas fa-envelope mr-2"></i> 4 new messages
                        <span class="float-right text-muted text-sm">3 mins</span>
                    </a>
                    <div class="dropdown-divider"></div>
                    <a href="#" class="dropdown-item">
                        <i class="fas fa-users mr-2"></i> 8 friend requests
                        <span class="float-right text-muted text-sm">12 hours</span>
                    </a>
                    <div class="dropdown-divider"></div>
                    <a href="#" class="dropdown-item">
                        <i class="fas fa-file mr-2"></i> 3 new reports
                        <span class="float-right text-muted text-sm">2 days</span>
                    </a>
                    <div class="dropdown-divider"></div>
                    <a href="#" class="dropdown-item dropdown-footer">See All Notifications</a>
                </div>
            </li>
            <li class="nav-item">
                <a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#"><i
                        class="fas fa-th-large"></i></a>
            </li>
            <!-- 会员下拉菜单 -->
            <li class="nav-item dropdown">
                <a class="nav-link" data-toggle="dropdown" href="#">
                    <img src="__STATIC__/adminlte/dist/img/user2-160x160.jpg" class="brand-image img-circle elevation-3"
                         alt="User Image" style="width: 30px">
                </a>
                <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
                    <span class="dropdown-header">15 Notifications</span>
                    <div class="dropdown-divider"></div>
                    <a href="{:url('admin/msg/send')}" class="dropdown-item">
                        <i class="fas fa-envelope mr-2"></i> 发布通知
                    </a>
                    <div class="dropdown-divider"></div>
                    <a href="#" class="dropdown-item">
                        <i class="fas fa-users mr-2"></i> 8 friend requests
                        <span class="float-right text-muted text-sm">12 hours</span>
                    </a>
                    <div class="dropdown-divider"></div>
                    <a href="#" class="dropdown-item">
                        <i class="fas fa-file mr-2"></i> 3 new reports
                        <span class="float-right text-muted text-sm">2 days</span>
                    </a>
                    <div class="dropdown-divider"></div>
                    <a href="{:url('admin/index/logout')}" class="dropdown-item dropdown-footer">退出登录</a>
                </div>
            </li>
            {/if}
        </ul>
    </nav>
    <!-- /.navbar -->

    <!-- Main Sidebar Container -->
    <aside class="main-sidebar sidebar-dark-primary elevation-4">
        <!-- Brand Logo -->
        <a href="{:url('index/index/course')}" class="brand-link">
            <img src="__STATIC__/images/logo.jpg" alt="AdminLTE Logo"
                 class="brand-image img-circle elevation-3"
                 style="opacity: .8">
            <span class="brand-text font-weight-light">ThinkPHP5.0示例</span>
        </a>

        <!-- Sidebar -->
        <div class="sidebar">

            {if condition="!$Think.cookie.admin_id"}
            <!-- Sidebar user panel (optional) -->
            <div class="user-panel mt-3 pb-3 mb-3 d-flex">

                <div class="image">
                    <img src="__STATIC__/adminlte/dist/img/user2-160x160.jpg"
                         class="img-circle elevation-2" alt="User Image">
                </div>
                <div class="info">
                    <a href="{:url('index/index/login')}" class="d-block">登录</a>
                </div>
            </div>


            {/if}
            {if condition="$Think.cookie.admin_id"}
            <!-- Sidebar user panel (optional) -->
            <div class="user-panel mt-3 pb-3 mb-3 d-flex">

                <div class="image">
                    <img src="{$Think.Cookie.photo?:'__STATIC__/adminlte/dist/img/user2-160x160.jpg'}"
                         class="img-circle elevation-2" alt="User Image">
                </div>
                <div class="info">
                    <a href="{:url('/')}"
                       class="d-block">{$Think.cookie.username}</a>
                </div>
            </div>
            {/if}
            <!-- Sidebar Menu -->
            <nav class="mt-2">
                <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
                    data-accordion="false">
                    <!-- Add icons to the links using the .nav-icon class
                         with font-awesome or any other icon font library -->
                    <li class="nav-item has-treeview menu-open">
                        <a href="#" class="nav-link active">
                            <i class="nav-icon fas fa-tachometer-alt"></i>
                            <p>
                                数据表
                                <i class="right fas fa-angle-left"></i>
                            </p>
                        </a>
                        <ul class="nav nav-treeview">
                            <li class="nav-item">
                                <a href="{:url('index/index/course')}" class="nav-link active">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>课程表</p>
                                </a>
                            </li>
                            <li class="nav-item">
                                <a href="{:url('index/ajax/ajaxrun')}" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>新同学</p>
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="nav-item">
                        <a href="{:url('index/index/like')}" class="nav-link">
                            <i class="nav-icon fas fa-th"></i>
                            <p>
                                课程搜索
                                <span class="right badge badge-danger">New</span>
                            </p>
                        </a>
                    </li>
                </ul>
            </nav>
            <!-- /.sidebar-menu -->
        </div>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1 class="m-0 text-dark">{$title|default=''}</h1>
                    </div><!-- /.col -->
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="{:url('index/msg/index')}">Home</a></li>
                            <li class="breadcrumb-item active">{$title|default=''}</li>
                        </ol>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>
        <!-- /.content-header -->

        <!-- Main content -->
        <div class="content">
            <div class="container-fluid">
                {__CONTENT__}
                <!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->

    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">
        <!-- Control sidebar content goes here -->
        <div class="p-3">
            <h5>Title</h5>
            <p>Sidebar content</p>
        </div>
    </aside>
    <!-- /.control-sidebar -->

    <!-- Main Footer -->
    <footer class="main-footer">
        <!-- To the right -->
        <div class="float-right d-none d-sm-inline">
            Anything you want
        </div>
        <!-- Default to the left -->
        <strong>Copyright &copy; 2014-{:date('Y')} <a href="https://open.gaoxueya.com">ThinkPHP5.0开发示例</a>.</strong> All
        rights reserved.
    </footer>
</div>
<!-- ./wrapper -->

<!-- REQUIRED SCRIPTS -->


<!-- jQuery -->
<script src="__STATIC__/adminlte/plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="__STATIC__/adminlte/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE App -->
<script src="__STATIC__/adminlte/dist/js/adminlte.min.js"></script>

<script src="https://www.layuicdn.com/layer/layer.js"></script>

<!--跳转变弹窗-->
<script src="__STATIC__/js/toast.js"></script>
<!-- 公共js-->
<script src="__STATIC__/js/common.js"></script>
<!-- 用户信息弹窗-->
<script src="__STATIC__/js/user_info.js"></script>

</body>
</html>
